import http from './index'

export const getList = (params) => http({
  url: '/roles/showRoleList',
  method: 'GET',
  params,
})

// export const create = (data) => http({
//   url: 'roles/addRole',
//   method: 'POST',
//   data,
// })
export const create = (data) => http({
  url: 'roles/addRole',
  method: 'POST',
  data,
})

export const update = (data) => http({
  url: '/roles/updateRole',
  method: 'POST',
  data,
})

export const detail = (params) => http({
  url: '/device-os/ota/item',
  method: 'GET',
  params,
})

export const del = (data) => http({
  url: '/roles/del',
  method: 'POST',
  data,
})
export const delOta = (data) => http({
  url: '/user/del',
  method: 'POST',
  data,
})
